@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="addInsuranceKindInfoForm">
            <input type="hidden" id="id" value="${policyPlan.id}">
            <input name="formToken" type="hidden" value="${session.formToken}" />
            <div class="row">
                <div>
                    <label class="control-label" style="padding: 15px;">${policyPlan.policyPlanCode}(${policyPlan.policyPlanName})</label>
                </div>
                @for(insuranceKind in insuranceKinds!){
                    <div class="form-group">
                        <div class="col-sm-1"></div>
                        <div class="col-sm-6">

                            <input type="hidden" id="amountType${insuranceKind.id}" value="${insuranceKind.amount_type}">
                            @if(insuranceKind.hasSelect==1){
                            <input type="checkbox" id="insuranceKindId${insuranceKind.id}"
                                   checked="checked"
                                   name="insuranceKindId" value="${insuranceKind.id}" onclick="AddInsuranceKindInfoDlg.selectInsuranceKind(${insuranceKind.id})">
                            @}else{
                            <input type="checkbox" id="insuranceKindId${insuranceKind.id}"
                                   name="insuranceKindId" value="${insuranceKind.id}" onclick="AddInsuranceKindInfoDlg.selectInsuranceKind(${insuranceKind.id})">
                            @}
                            <label class="control-label">${insuranceKind.insurance_kind_name}(${insuranceKind.insurance_kind_code})</label>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-1"></div>
                        <div class="col-sm-11">
                            <div class="col-sm-6">
                                <label class="col-sm-4 control-label" style="padding: 0;margin-top: 7px;">保额（元）：</label>
                                <!--固定保额-->
                                @if(insuranceKind.amount_type == 1){
                                    <div class="col-sm-6" style="padding: 0">
                                        <input class="form-control" disabled value="${insuranceKind.amount_limit,numberFormat='#,###.00'}"/>
                                    </div>
                                @}else{
                                    <div class="col-sm-5" style="padding: 0;position: relative;">
                                        @if(insuranceKind.hasSelect==0){
                                        <input id="amountLimit${insuranceKind.id}" class="form-control" style="padding: 0; width: 90%;" disabled="true"
                                               value="${insuranceKind.salaryTimes!}" name="amount${insuranceKind.id}" type="number" min="1" step="1"  max="99" maxlength="5" />
                                        @}else{
                                        <input id="amountLimit${insuranceKind.id}" class="form-control" style="padding: 0; width: 90%;"
                                               value="${insuranceKind.salaryTimes!}" name="amount${insuranceKind.id}" type="number" min="1" step="1"  max="99" maxlength="5" />
                                        @}
                                        <span style="position: absolute; right: -30px; top: 10px;">倍月薪</span>
                                        <p style="width: max-content;">免核保额度：${insuranceKind.amount_limit,numberFormat="#,###.00"}元</p>
                                    </div>
                                @}
                            </div>
                            <div class="col-sm-6">
                                <label class="col-sm-4 control-label" style="padding: 0;margin-top: 7px;">保费（元）：</label>
                                <div class="col-sm-6" style="padding: 0">
                                    @if(insuranceKind.amount_type == 2){
                                        <input class="form-control" type="number" disabled  value="-"/>
                                        <p style="width: max-content;">保费比例：${insuranceKind.amount,numberFormat="#,###.00"}%</p>
                                    @}else{
                                        <input class="form-control" disabled  value="${insuranceKind.amount,numberFormat='#,###.00'}"/>
                                    @}
                                </div>
                            </div>
                        </div>
                    </div>
                @}
            </div>
            <div class="row btn-group-m-t">
                <div class="col-sm-12" style="text-align: center;">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="AddInsuranceKindInfoDlg.editSubmit()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="AddInsuranceKindInfoDlg.close()"/>
                </div>
            </div>
        </div>
    </div>
    <script src="${ctxPath}/static/modular/system/policyPlan/addInsuranceKind_info.js"></script>
    @}
